<?php
	//Data Keluarga
	$kode=$_POST['kode'];
	$id=$_POST['id'];
	$tgl=date("Y-m-d");
	$jenis=$_POST['Jenis'];
	$surat=$_POST['surat'];

	if(isset($_POST['submit'])){
		$sql="insert into peserta(id_peserta,tgl,id_jenis_peserta,id_penduduk,no_surat) values ('$kode','$tgl',$jenis,$id,'$surat')";
		$qry=mysql_query($sql);
	}
	
	$url_sukses="module/mod_peserta/cetak.php?id=$kode";
	if($qry){
		echo "<meta http-equiv='refresh' content='0; url=$url_sukses'>";
		exit;
	}else{
		echo mysql_error();
	}
?>